package xin.mydreams.purple;

import xin.mydreams.purple.bootstrap.NettyBootstrap;
import xin.mydreams.purple.config.PurpleSetting;

/**
 * 入口文件
 * 
 * @author hh
 *
 */
public class PurpleServer {

	/**
	 * 启动
	 */
	public static void start(Class<?> clazz) {
		try {
			long start=System.currentTimeMillis();
			PurpleSetting.setting(clazz);
			NettyBootstrap.start(start);
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(-1);
		}
	}
	
	public static void main(String[] args) {
		start(PurpleServer.class);
	}
}
